import { createRouter, createWebHistory } from "vue-router";
const history = createWebHistory()
const routeTable = [
    { path: "/", redirect: "/login" }, //默认页面
    { path: '/login', name: 'login', component: () => import('@/components/login.vue'), meta: { asideName: '登录' } },
    {
        path: '/cms', name: 'cms', component: () => import('@/components/cms.vue'),
        children: [
            //     { path: '/tbd', name: 'tbd', component: () => import('@/components/tbd/tbd.vue'), meta: { asideName: '首页', icon: 'HomeFilled' } },
            //     { path: '/adminlist', name: 'adminlist', component: () => import('@/components/admin/admin_list.vue'), meta: { asideName: '管理员', icon: 'Avatar' } },
            //     { path: '/tbd', name: 'tbd', component: () => import('@/components/tbd/tbd.vue'), meta: { asideName: '店铺管理', icon: 'Shop' } },
            //     { path: '/goodlist', name: 'goodlist', component: () => import('@/components/goodlist/goodlist.vue'), meta: { asideName: '商品管理', icon: 'GoodsFilled' } },
            //     { path: '/order', name: 'order', component: () => import('@/components/order/order.vue'), meta: { asideName: '订单管理', icon: 'List' } },
            //     { path: '/user', name: 'user', component: () => import('@/components/user/user.vue'), meta: { asideName: '会员管理', icon: 'Avatar' } },
            //     { path: '/tbd', name: 'tbd', component: () => import('@/components/tbd/tbd.vue'), meta: { asideName: '内容管理', icon: 'Checked' } },
            //     { path: '/tbd', name: 'tbd', component: () => import('@/components/tbd/tbd.vue'), meta: { asideName: '营销管理', icon: 'PriceTag' } },
            //     { path: '/tbd', name: 'tbd', component: () => import('@/components/tbd/tbd.vue'), meta: { asideName: '数据统计', icon: 'PieChart' } },
            //     { path: '/tbd', name: 'tbd', component: () => import('@/components/tbd/tbd.vue'), meta: { asideName: '客户端', icon: 'InfoFilled' } },

            { path: '/cms/tbd', name: 'tbd', component: () => import('@/components/common/tbd.vue') },
            // { path: "/index", component: () => import('@/components/views/index/index.vue') },
            { path: "/cms/adminlist", component: () => import('@/components/views/admin/admin_list.vue') },
            { path: "/cms/rolelist", component: () => import('@/components/views/admin/role_list.vue') },
            { path: '/cms/goodlist', component: () => import('@/components/views/good/good_list.vue') },
            { path: '/cms/goodtype', component: () => import('@/components/views/good/good_type.vue') },
        ]
    }
]

const router = createRouter({ history: history, routes: routeTable })
export { router, routeTable }